#include <iostream>
using namespace std;
class Solution {
public:
    /**
     * 获得两个整形二进制表达位数不同的数量
     * 
     * @param m 整数m
     * @param n 整数n
     * @return 整型
     */
    int countBitDiff(int m, int n) {
    	int rst = m^n;
    	cout<<rst<<endl;
    	return count1(rst);
    }

    int count1(unsigned int rst)
    {
    	cout<<rst<<endl;
		rst = (rst&0x55555555) + ((rst>>1)&0x55555555);
		cout<<rst<<endl;
		rst = (rst&0x33333333) + ((rst>>2)&0x33333333);
		cout<<rst<<endl;
		rst = (rst&0x0f0f0f0f) + ((rst>>4)&0x0f0f0f0f);
		cout<<rst<<endl;
		rst = (rst&0x00ff00ff) + ((rst>>8)&0x00ff00ff);
		cout<<rst<<endl;
		rst = (rst&0x0000ffff) + ((rst>>16)&0x0000ffff);
		cout<<rst<<endl;
		return rst;
    }

};

int main()
{
	Solution s;
	cout<<s.countBitDiff(1999,2299)<<endl;
}